<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
  xmlns:msxsl="urn:schemas-microsoft-com:xslt" 
  exclude-result-prefixes="msxsl"
  version="1.0">
<xsl:import href="../Common/meta.xsl"/>
<xsl:output method="html" 
	doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" 
	doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" />
<xsl:param name="lang" select="'chi'"/>
<xsl:param name="id" select="'Terrace'"/>
<xsl:variable name="exhibits" select="document(//exhibits/@href)"/>
<xsl:template match = "/">
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <title>
       <xsl:call-template name="title" />
     </title>
     <xsl:call-template name="content-lang" />
     <link rel="stylesheet" type="text/css" media="screen" href="/css/default.css" />
     <link rel="stylesheet" type="text/css" media="screen" href="/css/exhibition/floorplan.min.css" />
     <link rel="stylesheet" type="text/css" media="print" href="/css/print.css" />
     <script type="text/javascript" src="/js/lib/jquery-1.5.1.min.js"></script>
     <script type="text/javascript" src="/js/lib/hoverIntent.min.js"></script>
     <script type="text/javascript" src="/js/lib/superfish.min.js"></script>
     <script type="text/javascript" src="/js/lib/jquery.cycle.all.min.js"></script>
     <script type="text/javascript" src="/js/exhibition/moveit.js"></script>
     <script type="text/javascript" src="/js/exhibition/spot.js"></script>
     <script type="text/javascript" src="http://www.google-analytics.com/ga.js"></script>
     <script type="text/javascript">
       var pageTracker = _gat._getTracker("UA-3662766-1");
       pageTracker._initData();
       pageTracker._trackPageview();
     </script>
   </head>
   <body onload="initi(event)">
     <div id="FloorPlan">
       <xsl:call-template name="showheader" />
       <xsl:apply-templates select="//floorplan[@id=$id]" />
       <xsl:call-template name="showfooter" />
     </div>
   </body>
 </html>
</xsl:template>

<xsl:template name="title">
  <xsl:value-of select="//floorplan[@id=$id]/header[@lang=$lang]" />
</xsl:template>

  <xsl:template name="showheader">
<!--
  <h1>
    <xsl:value-of select="//floorplan[@id=$id]/header[@lang=$lang]" />
  </h1>
-->
</xsl:template>

<xsl:template name="showfooter">
</xsl:template>

<xsl:template match="floorplan">
<div id="spot"></div>
<img id="imgmap" src="/images/floorplan/{img/@href}" width="568" useMap="#floorplan" />
  <span id="map">
    <map name="floorplan">
      <xsl:for-each select="item">
        <xsl:variable name="gal" select="@gallery" />
        <xsl:variable name="href">
          <xsl:choose>
            <xsl:when test="@href">
              <xsl:value-of select="@href" />
            </xsl:when>
            <xsl:otherwise>
              <xsl:value-of select="concat(@gallery,'.html')" />
            </xsl:otherwise>
          </xsl:choose>
        </xsl:variable>
        <area onmouseover="show('{img/@href}','{$exhibits//items[@gallery=$gal]/header[@lang=$lang]}')" onmouseout="hide();" shape="CIRCLE" alt="" coords="{coords/@x},{coords/@y},15" href="{$href}" />
      </xsl:for-each>
    </map>
  </span>
  <div class="gallery_list">
    <ul>
      <xsl:for-each select="item">
        <xsl:variable name="gal" select="@gallery" />
        <li>
          <xsl:variable name="href">
            <xsl:choose>
              <xsl:when test="@href">
                <xsl:value-of select="@href" />
              </xsl:when>
              <xsl:otherwise>
                <xsl:value-of select="concat(@gallery,'.html')" />
              </xsl:otherwise>
            </xsl:choose>
          </xsl:variable>
          <a href="{$href}" onmouseover="showspot({coords/@x},{coords/@y})" onmouseout="hidespot()">
            <xsl:value-of select="$exhibits//items[@gallery=$gal]/header[@lang=$lang]" />
          </a>
        </li>
      </xsl:for-each>
    </ul>
  </div>
  <div id="infolayer"></div>
</xsl:template>

</xsl:stylesheet>
